/*
 * com.javable.cese -- Cell Electrophysiology Simulation Environment (CESE)
 *
 * Copyright (C) 1999 - 2005 Sergey Missan
 * 
 * Dalhousie Univ., Halifax, NS, Canada
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

package models.com.javable.cese.models;

import java.awt.Image;
import java.beans.BeanDescriptor;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;

public class BeelerReuterModel_1977BeanInfo extends SimpleBeanInfo {
    
  /** Icon for image data objects. */
    private Image icon;
    
  /** Extended descriptor for this bean. */    
    private BeanDescriptor descriptor;
    
  /** Array of property descriptors. */
    public BeelerReuterModel_1977BeanInfo() {
        icon = loadImage ("model_cardiac.png");
    }
    
  /** Provides the Models's icon */
    public Image getIcon(int type) {
        return icon;
    }
    
    /** Provides the Models's descriptor */    
    public BeanDescriptor getBeanDescriptor(){
    	descriptor = new BeanDescriptor(BeelerReuterModel_1977.class);
    	descriptor.setDisplayName("The Beeler-Reuter Model of Membrane Action Potentials of Mammalian Ventricular Myocytes, 1977");
        descriptor.setShortDescription(
        "The Beeler-Reuter Model of Membrane Action Potentials of Mammalian Ventricular Myocytes, 1977 <p>"+
        "J Physiol 1977;268:177-210.");
    	
        descriptor.setValue("version", "1.4");
    	return descriptor ;
    }
    
  /** Create a new property descriptor
   * @return Property Descriptor
   */
    private PropertyDescriptor createPropertyDescriptor (String name, String gett, String sett, String group) {
        PropertyDescriptor pd=null;
        try {
            pd = new PropertyDescriptor (name, BeelerReuterModel_1977.class, gett, sett);
            pd.setShortDescription(group);
        }
        catch (IntrospectionException ex) {}
        return pd;
    }
    
  /** Descriptor of valid properties
   * @return array of properties
   */
    public PropertyDescriptor[] getPropertyDescriptors () {
        PropertyDescriptor[] desc =
        {
            createPropertyDescriptor ("Length of the cell (cm)",  "getl", "setl","Cell Geometry"),
            createPropertyDescriptor ("Radius of the cell (cm)",  "geta", "seta","Cell Geometry"),
            
            createPropertyDescriptor ("Membrane voltage (mV)",  "getv", "setv","Voltage"),
            
            createPropertyDescriptor ("Time step (ms)",  "getdt", "setdt","Time Step"),
            createPropertyDescriptor ("Initial time (ms)",  "gett", "sett","Time Step"),
            
            createPropertyDescriptor ("Stimulus amplitude (uA/cm^2)",  "getst", "setst","Total Current and Stimulus"),
            createPropertyDescriptor ("Time when stimulus is applied (ms)",  "gettstim", "settstim","Total Current and Stimulus"),
            createPropertyDescriptor ("Stimulus duration (ms)",  "getstl", "setstl","Total Current and Stimulus"),
            createPropertyDescriptor ("Total experiment time (ms)",  "getetime", "setetime","Total Current and Stimulus"),
            createPropertyDescriptor ("Basic cycle length (ms)",  "getbcl", "setbcl","Total Current and Stimulus"),
            
            createPropertyDescriptor ("Temperature (K)",  "gettemp", "settemp","Termodynamics"),
            
            createPropertyDescriptor ("Intracellular Ca concentration (mM)",  "getcai", "setcai","Ion Concentrations"),
             
            createPropertyDescriptor ("Scaling factor of the Na current",  "getscgna", "setscgna","Fast Sodium Current (time dependent)"),
            
            createPropertyDescriptor ("Scaling factor of the Inward Ca current",  "getscgca", "setscgca","Inward Ca Current"),
             
            createPropertyDescriptor ("Scaling factor of the Time-dependent K current",  "getscgkt", "setscgkt","Time-dependent Potassium Current"),
            
            createPropertyDescriptor ("Scaling factor of the time independent K current",  "getscgki", "setscgki","Potassium Current (time-independent)"),
            
            
            
            createPropertyDescriptor ("|OUT Membrane voltage (mV)",  "getv", null,"Voltage"),
            createPropertyDescriptor ("|OUT d voltage / d time (mV/ms)",  "getdvdt", null,"Voltage"),
            
            createPropertyDescriptor ("|OUT Fast Na current (uA/uF)",  "getina", null,"Fast Sodium Current (time dependent)"),
            createPropertyDescriptor ("|OUT Reversal potential of Na (mV)",  "getena", null,"Fast Sodium Current (time dependent)"),
            createPropertyDescriptor ("|OUT Na activation m",  "getm", null,"Fast Sodium Current (time dependent)"),
            createPropertyDescriptor ("|OUT Na inactivation h",  "geth", null,"Fast Sodium Current (time dependent)"),
            createPropertyDescriptor ("|OUT Na inactivation j",  "getj", null,"Fast Sodium Current (time dependent)"),
            
            createPropertyDescriptor ("|OUT Inward Ca Current (uA/uF)",  "getica", null,"Inward Ca Current"),
            createPropertyDescriptor ("|OUT Reversal potential of Ca (mV)",  "geteca", null,"Inward Ca Current"),
            createPropertyDescriptor ("|OUT Voltage dependent activation gate d",  "getd", null,"Inward Ca Current"),
            createPropertyDescriptor ("|OUT Voltage dependent inactivation gate f",  "getf", null,"Inward Ca Current"),
            createPropertyDescriptor ("|OUT Max. Inward Ca current (uA/uF)",  "getgca", null,"Inward Ca Current"),
            
            createPropertyDescriptor ("|OUT Time-dependent K current (uA/uF)",  "getikt", null,"Time-dependent Potassium Current"),
            createPropertyDescriptor ("|OUT K time-dependent activation",  "getxt", null,"Time-dependent Potassium Current"),
            createPropertyDescriptor ("|OUT K time-independent inactivation r",  "getr", null,"Time-dependent Potassium Current"),
            
            createPropertyDescriptor ("|OUT Time-independent K current (uA/uF)",  "getiki", null,"Potassium Current (time-independent)"),
            createPropertyDescriptor ("|OUT K inactivation",  "getkin", null,"Potassium Current (time-independent)"),
            
            createPropertyDescriptor ("|OUT Total current (uA/cm^2)",  "getit", null,"Total Current"),
            createPropertyDescriptor ("|OUT Total Na ion flow (mM/ms)",  "getnaiont", null,"Total Current"),
            createPropertyDescriptor ("|OUT Total K ion flow (mM/ms)",  "getkiont", null,"Total Current"),
            createPropertyDescriptor ("|OUT Total Ca ion flow (mM/ms)",  "getcaiont", null,"Total Current"),
            
            createPropertyDescriptor ("|OUT Intracellular Ca concentration (mM)",  "getcai", null,"Myoplasmic Ca Ion Concentration Changes"),
            createPropertyDescriptor ("|OUT Change in myoplasmic Ca concentration (mM)",  "getdcai", null,"Myoplasmic Ca Ion Concentration Changes"),
            
            createPropertyDescriptor ("Number of iterations",  "getsteps", null,"Time Step"),
        };
        return desc;
    }
}